/*
 * @Descripttion: 
 * @version: 
 * @Author: yuanliutech
 * @Date: 2022-11-30 14:33:34
 * @LastEditors: yuanliutech@lwj
 * @LastEditTime: 2022-12-05 15:37:04
 */

const config = {
    state: {
        environment: '', //运行环境
        isVertical: JSON.parse(window.sessionStorage.getItem("isVertical")) || (JSON.parse(window.sessionStorage.getItem("isVertical")) === true ? true : false), //顶部导航/侧面导航
        isWhiteTheme: JSON.parse(window.sessionStorage.getItem("isWhiteTheme")) || false, //主题颜色
        isFold: JSON.parse(window.sessionStorage.getItem("isFold")) || (JSON.parse(window.sessionStorage.getItem("isFold")) === false ? false : true), //侧边导航栏折叠/展开----默认展开
        // isFold: JSON.parse(window.sessionStorage.getItem("isFold")) || false,  //默认折叠
        flagDatav: false, //判断是不是从大屏跳转过来
    },

    mutations: {
        // 区分环境
        saveEnvironment(state, status) {
            state.environment = status;
        },
        saveIsVertical(state, flag) {
            state.isVertical = flag;
            window.sessionStorage.setItem("isVertical", JSON.stringify(flag))
        },
        //主题颜色
        saveIsWhiteTheme(state, flag) {
            state.isWhiteTheme = flag;
            window.sessionStorage.setItem("isWhiteTheme", JSON.stringify(flag))
        },
        saveIsFold(state, flag) {
            // console.log(flag);
            state.isFold = flag;
            window.sessionStorage.setItem("isFold", JSON.stringify(flag))
        },
        //判断是不是从大屏跳转过来
        saveflagDatav(state, flag) {
            state.flagDatav = flag;
            window.sessionStorage.setItem("flagDatav", JSON.stringify(flag))
        },

    },
    actions: {
        aa(a) {
            // console.log(11);
        }
    },
};

export default config;